package com.asteros.crypto;

import com.asteros.crypto.utils.content.ContentManager;
import com.asteros.crypto.utils.services.CryptoService;
import com.asteros.crypto.utils.services.CryptoServiceConfig;

public final class RemoteClient extends CryptoService
{
	private ContentManager contentManager = null;
	
	public RemoteClient(CryptoServiceConfig serviceConfig, ContentManager contentManager) throws Exception
	{
		super(serviceConfig);
		this.contentManager = contentManager;
	}

	public void signDocument(String userId, String documentId) throws Exception
	{
		byte[] content = this.contentManager.getContent(userId, documentId);

		byte[] sign = super.sign(content);
//		byte[] sign = utils.sign(data, signers);
		
		this.contentManager.saveSignedData(userId, documentId, sign);
	}

	public void verifyDocumentSignature(String userId, String documentId) throws Exception
	{
		this.contentManager.verifyDocumentSignature(userId, documentId);
	}
}

/* Location:           C:\Users\Kirill\Desktop\esign\esign\esign.jar
 * Qualified Name:     com.asteros.crypto.RemoteClient
 * JD-Core Version:    0.6.0
 */